import { post } from '@/utils/request';

export interface ListParams {
  classifyType: any;
  securityNo: any;
  callTimeStart: any;
  callTimeEnd: any;
  inputType: string;
  inputParams: string;
  xqdwCodes: string;
  classifyCodes: string;
  callSummaryCodes: string;
  dealSummaryCodes: string;
  subdivisionFlag: string;
  trafficFlag: string;
  otherFlag: string;
  page: number;
  size: number;
}

export interface optionsList {
  revertSource: string;
  caseNos: string;
  remark: string;
  newClassifyCode: string;
  inputClassifyName: string;
}

export interface MonitorParams {
  page: number;
  size: number;
  securityNo: any;
  inputParams: string;
  processFlag: string;
}

export interface AddParams {
  securityNo: any;
  classifyCodes: string;
  dealSummaryCodes: string;
  callSummaryCodes: string;
  xqdwCodes: string;
  monitorStartDate?: string;
  period?: string;
  targetCaseNum: string;
  monitorType: string;
  monthDates: any;
  monthTargets: any;
}

export interface YoyChain {
  classifyCodes: string;
  dealSummaryCodes: string;
  callSummaryCodes: string;
  xqdwCodes: string;
  monitorStartDate?: any;
  period?: string;
  securityNo: any;
}

export interface ListDetailParams {
  caseNo?: string;
}

//警情列表
export async function getQueryCaseList(params: ListParams) {
  return post('/security/detail/queryCaseList', params);
}

//接警信息接口
export async function getCallDetail(params: ListDetailParams) {
  return post('/common/baseCall/detail', params);
}

//出警信息接口
export async function getDepartDetail(params: ListDetailParams) {
  return post('/common/baseDepart/detail', params);
}

//反馈信息接口
export async function getDealDetail(params: ListDetailParams) {
  return post('/common/baseDeal/details', params);
}

//智能分类
export async function getClassifyTree() {
  return post('/common/bsparam/getParamList');
}

//智能分类修改确定
export async function getRevertClassify(params: optionsList) {
  return post('/console/caseRevert/revertClassify', params);
}

//时间轴
export async function getQueryTimeLine(params: ListParams) {
  return post('/security/detail/queryTimeLine', params);
}

//乱点整改监测
export async function getQueryMonitorList(params: MonitorParams) {
  return post('/security/monitor/info/queryMonitorList', params);
}
//查看监测规则
export async function getQueryMonitorInfo(params: { monitorNo: string }) {
  return post('/security/monitor/info/queryMonitorInfo', params);
}
//整改周期变化
export async function getQueryYoyChain(params: YoyChain) {
  return post('/security/monitor/info/queryYoyChain', params);
}
//添加监测规则
export async function getAdd(params: AddParams) {
  return post('/security/monitor/info/add', params);
}

//趋势视图
export async function getQueryCaseTrend(params: ListParams) {
  return post('/security/detail/queryCaseTrend', params);
}

//分类统计
export async function getQueryMultiStat(params: ListParams) {
  return post('/security/detail/queryMultiStat', params);
}

//情报颗粒统计
export async function getQueryFeaturePieBar(params: ListParams) {
  return post('/security/detail/queryFeaturePieBar', params);
}
